package com.diandian.backend.dingding.data.param;

import com.diandian.backend.dingding.data.dto.DingdingStaffExtendSyncParamDTO;
import com.diandian.base.boot.starter.exception.DefaultException;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

public class DingdingStaffExtendSyncParam implements Serializable {

	private String belong;
	private String syncUserId;
	private String syncUserName;
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date syncTime;
	private String orgId;
	private String orgCode;
	private String userId;
	private String star;
	private String xinghuoTier;
	private String recommendBrand;
	private String status;

	public void check(){
		if(this.belong == null || "".equals(this.belong)){
			throw new DefaultException("归属标识不能为空");
		}
		if(this.userId == null || "".equals(this.userId)){
			throw new DefaultException("用户id不能为空");
		}
	}

	public DingdingStaffExtendSyncParamDTO toDTO(){
		DingdingStaffExtendSyncParamDTO dto = new DingdingStaffExtendSyncParamDTO();
		dto.setBelong(this.belong);
		dto.setSyncUserId(this.syncUserId);
		dto.setSyncUserName(this.syncUserName);
		dto.setSyncTime(this.syncTime);
		dto.setOrgId(this.orgId);
		dto.setOrgCode(this.orgCode);
		dto.setUserId(this.userId);
		dto.setStar(this.star);
		dto.setXinghuoTier(this.xinghuoTier);
		dto.setRecommendBrand(this.recommendBrand);
		dto.setStatus(this.status);
		return dto;
	}

	public String getBelong() {
		return belong;
	}

	public void setBelong(String belong) {
		this.belong = belong;
	}

	public String getSyncUserId() {
		return syncUserId;
	}

	public void setSyncUserId(String syncUserId) {
		this.syncUserId = syncUserId;
	}

	public String getSyncUserName() {
		return syncUserName;
	}

	public void setSyncUserName(String syncUserName) {
		this.syncUserName = syncUserName;
	}

	public Date getSyncTime() {
		return syncTime;
	}

	public void setSyncTime(Date syncTime) {
		this.syncTime = syncTime;
	}

	public String getOrgId() {
		return orgId;
	}

	public void setOrgId(String orgId) {
		this.orgId = orgId;
	}

	public String getOrgCode() {
		return orgCode;
	}

	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getStar() {
		return star;
	}

	public void setStar(String star) {
		this.star = star;
	}

	public String getXinghuoTier() {
		return xinghuoTier;
	}

	public void setXinghuoTier(String xinghuoTier) {
		this.xinghuoTier = xinghuoTier;
	}

	public String getRecommendBrand() {
		return recommendBrand;
	}

	public void setRecommendBrand(String recommendBrand) {
		this.recommendBrand = recommendBrand;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
}
